﻿<%@page import="com.yuxi.Service.Impl.UserServiceImpl"%>
<%@page import="com.yuxi.Entity.PowerUser"%>
<%@page import="com.yuxi.spring.jbpm.Util.SpringContextUtils"%>
<%@page import="com.yuxi.Service.UserService"%>
<%@page import="com.yuxi.Entity.PowerRole"%>
<%@page import="com.yuxi.view.UserPowerView"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<% 
	PowerRole powerUser=new PowerRole();
	
%>
<div>
<style type="text/css">
	.count-text{padding-left:10px;color:red}
	.menuPower-false{display: none;}
	.menuPower-true{}
</style>
<% 	
	try{
		UserPowerView user1=(UserPowerView)request.getSession().getAttribute("userPowerView");
		if(user1==null||user1.getPowerRole()==null){
			UserService curus=(UserService)SpringContextUtils.getBeanByClass(UserService.class);
			user1=curus.curLoginUserPowerView(request.getSession());
		}		
		if(user1==null||user1.getPowerRole()==null){			
			response.sendRedirect("/yuxi/model/home/index.jsp?menuId=0");
		}else{
			powerUser=user1.getPowerRole();
		}
	}catch(Exception e ){
		response.sendRedirect("/yuxi/model/home/index.jsp?menuId=0");
	}
	System.out.print(powerUser.toString());
%>
<ul class="list-group menu" id='menu-container'>   
     <li ><a class="list-group-item" href="#home" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>首页</a>
        <ul  id="home" class="nav nav-list collapse secondmenu menu-container">
         <li><a href="/yuxi/model/home/index.jsp"><span class="glyphicon glyphicon-edit"></span>统计图</a></li>
        </ul>
     </li>
    <li class="menuPower-<%=powerUser.isPrisonInfoManage()%>"><a  class="list-group-item" href="#myoffice"  data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息管理<span class="count-text infoMange-count" id=""></span></a>
      <ul id="myoffice" class="nav nav-list collapse menu-container">
        <li ><a href="/yuxi/model/information/addInfo.jsp"><span class="glyphicon glyphicon-edit"></span> 添加信息</a></li>
<!--         <li class="active"><a href="/yuxi/model/information/drafts.jsp"><span class="glyphicon glyphicon-time"></span> 草稿箱</a></li> -->
        <li><a href="/yuxi/model/information/submittedInfo.jsp"><span class="glyphicon glyphicon-th-list"></span>待提交信息<span class="count-text infoMange-count" id=""></span></a></li>
        <li><a href="/yuxi/model/information/personal.jsp"><span class="glyphicon glyphicon-th-list"></span>已提交信息<span class="count-text infoMange-count" id=""></span></a></li>
<!--         <li><a href="/yuxi/model/information/completedInfo.jsp"><span class="glyphicon glyphicon-envelope"></span>  已完成信息</a></li> -->
       <!--   <li><a href="/yuxi/model/information/overInfo.jsp"><span class="glyphicon glyphicon-envelope"></span> 已结束信息</a></li> -->
      </ul>
    </li>    
     <li class="menuPower-<%=powerUser.isPrisonFirstCheck()%>"><a class="list-group-item" href="#firstTrial" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息初审<span class="count-text firstCheck-count" id=""></span></a>
        <ul  id="firstTrial" class="nav nav-list collapse secondmenu menu-container">
          <li class="active"><a href="/yuxi/model/firstTrial/pendingTrial.jsp"><span class="glyphicon glyphicon-user"></span> 待处理的信息<span class="count-text firstCheck-count" id=""></span></a></li>
          <li><a href="/yuxi/model/firstTrial/dealTrial.jsp"><span class="glyphicon glyphicon-th-list"></span> 已处理的信息</a></li>   
        </ul>
     </li>
      <li class="menuPower-<%=powerUser.isPrisonReCheck()%>"><a class="list-group-item" href="#review" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息复核<span class="count-text recheck-count" id=""></span></a>
        <ul  id="review" class="nav nav-list collapse secondmenu menu-container">
          <li class="active"><a href="/yuxi/model/reviewTrial/rePendingTrial.jsp"><span class="glyphicon glyphicon-user"></span> 待复核的信息<span class="count-text recheck-count" id=""></span></a></li>
          <li><a href="/yuxi/model/reviewTrial/reDealTrial.jsp"><span class="glyphicon glyphicon-th-list"></span> 已复核的信息</a></li>   
        </ul>
     </li>
     <li class="menuPower-<%=powerUser.isPrisonCheck()%>"><a class="list-group-item" href="#audit" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息审核<span class="count-text check-count" id=""></span></a>
        <ul  id="audit" class="nav nav-list collapse secondmenu menu-container">
          <li><a href="/yuxi/model/examine/exPendingTrial.jsp"><span class="glyphicon glyphicon-user"></span> 待审核的信息<span class="count-text check-count" id=""></span></a></li>
          <li><a href="/yuxi/model/examine/exDealTrial.jsp"><span class="glyphicon glyphicon-th-list"></span> 已审核的信息</a></li>   
        </ul>
     </li>
     
     <!-- mouse -->
       <li class="menuPower-<%=powerUser.isPrisonInfoResearch()%>"><a class="list-group-item" href="#judge" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息研判<span class="count-text reSeach-count" id=""></span></a>
        <ul  id="judge" class="nav nav-list collapse secondmenu menu-container">
          <li ><a href="/yuxi/model/judge/stayJudge.jsp"><span class="glyphicon glyphicon-user"></span> 待研判的信息<span class="count-text reSeach-count" id=""></span></a></li>
          <li><a href="/yuxi/model/judge/finishJudge.jsp"><span class="glyphicon glyphicon-th-list"></span> 已研判的信息</a></li>
        </ul>
     </li>
     
     <li class="menuPower-<%=powerUser.isPrisonTaskDispatch()%>"><a class="list-group-item" href="#taskDispatch" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>任务派遣<span class="count-text taskDispatch-count" id=""></span></a>
        <ul  id="taskDispatch" class="nav nav-list collapse secondmenu menu-container">
          <li class="active"><a href="/yuxi/model/reviewTrial/taskDispatchList.jsp"><span class="glyphicon glyphicon-user"></span>任务派遣待处理 <span class="count-text taskDispatch-count" id=""></span></a></li>
          <li><a href="/yuxi/model/reviewTrial/finishTask.jsp"><span class="glyphicon glyphicon-th-list"></span>已派遣任务 </a></li>        
        </ul>
    </li>
    
     <li class="menuPower-<%=powerUser.isPrisonCurTaskDispatch()%>"><a class="list-group-item" href="#taskDispatch1" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>即时任务派遣<span class="count-text curTaskDispatch-count" id=""></span></a>
        <ul  id="taskDispatch1" class="nav nav-list collapse secondmenu menu-container">         
          <li><a href="/yuxi/model/reviewTrial/realTimetask.jsp"><span class="glyphicon glyphicon-user"></span>即时任务派遣待处理 <span class="count-text curTaskDispatch-count" id=""></span></a></li>
           <li><a href="/yuxi/model/reviewTrial/finishRealtime.jsp"><span class="glyphicon glyphicon-th-list"></span>已派遣即时任务 </a></li>
        </ul>
    </li>
     <li class="menuPower-<%=powerUser.isPrisonTaskFinsh()%>" ><a class="list-group-item" href="#edutional" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 任务处理<span class="count-text taskDo-count" id=""></span></a>
        <ul  id="edutional" class="nav nav-list collapse secondmenu menu-container">
          <li ><a href="/yuxi/model/taskProcessing/responsibleTask.jsp"><span class="glyphicon glyphicon-user"></span> 待办任务<span class="count-text taskDo-count" id=""></span></a></li>
          <li><a href="/yuxi/model/taskProcessing/completelTask.jsp"><span class="glyphicon glyphicon-th-list"></span> 任务完成情况</a></li>   
        </ul>
     </li>     
      <li class="menuPower-<%=powerUser.isPrisonInfoComment()%>"><a class="list-group-item" href="#situation" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息点评<span class="count-text comment-count" id=""></span></a>
        <ul  id="situation" class="nav nav-list collapse secondmenu menu-container">
          <li class="active"><a href="/yuxi/model/comment/stayComment.jsp"><span class="glyphicon glyphicon-user"></span> 待点评的信息<span class="count-text comment-count" id=""></span></a></li>
          <li><a href="/yuxi/model/comment/finishComment.jsp"><span class="glyphicon glyphicon-th-list"></span>已点评的信息</a></li>
         
        </ul>
     </li>
      <li class="menuPower-<%=powerUser.isPrisonInfoRated()%>"><a class="list-group-item" href="#situation1" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息评价<span class="count-text rate-count" id=""></span></a>
        <ul  id="situation1" class="nav nav-list collapse secondmenu menu-container"> 
           <li><a href="/yuxi/model/comment/toEvaluate.jsp"><span class="glyphicon glyphicon-th-list"></span>待评价的信息 <span class="count-text rate-count" id=""></span></a></li>
          <li><a href="/yuxi/model/comment/stayRate.jsp"><span class="glyphicon glyphicon-th-list"></span>已评价信息</a></li>
        </ul>
     </li>
      <li  class="menuPower-<%=powerUser.isDeployment()%>"><a class="list-group-item" href="#situation2" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span> 信息调配<span class="count-text timeOut-count" id=""></span></a>
        <ul  id="situation2" class="nav nav-list collapse secondmenu menu-container">   
         <li><a href="/yuxi/model/comment/timeOutInfo.jsp"><span class="glyphicon glyphicon-th-list"></span> 超期信息<span class="count-text timeOut-count" id=""></span></a></li>         
          <li><a href="/yuxi/model/comment/allInfo.jsp"><span class="glyphicon glyphicon-th-list"></span> 所有信息</a></li>         
          <li><a href="/yuxi/model/comment/deploy.jsp"><span class="glyphicon glyphicon-th-list"></span> 被调配的信息</a></li>
        </ul>
     </li>
     <li  class="menuPower-<%=powerUser.isQueryCommernt()%>"><a class="list-group-item " href="#queryComment"  data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>待查阅点评信息<span class="count-text queryComment-count" id=""></span></a>
       <ul  id="queryComment" class="nav nav-list collapse secondmenu menu-container" >
          <li class="active"><a href="/yuxi/model/informationSearch/queryComment.jsp"><span class="glyphicon glyphicon-user"></span>待查阅点评信息<span class="count-text queryComment-count" id=""></span></a></li>
          <li><a href="/yuxi/model/informationSearch/alreadyQueryComment.jsp"><span class="glyphicon glyphicon-th-list"></span>已查阅点评信息</a></li>
        </ul>
    </li>
	 <li  class="menuPower-<%=powerUser.isQueryEvaluate()%>"><a class="list-group-item " href="#queryEvaluate"  data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>待查阅评价信息<span class="count-text queryEvaluate-count" id=""></span></a>
       <ul  id="queryEvaluate" class="nav nav-list collapse secondmenu menu-container" >
          <li class="active"><a href="/yuxi/model/informationSearch/queryEvaluate.jsp"><span class="glyphicon glyphicon-user">待查阅评价信息</span><span class="count-text queryEvaluate-count" id=""></span> </a></li>
          <li><a href="/yuxi/model/informationSearch/alreadyQueryEvaluate.jsp"><span class="glyphicon glyphicon-th-list"></span>已查阅评价信息</a></li>
        </ul>
    </li>
     <li  class="menuPower-<%=powerUser.isInfoQuery()%>"><a class="list-group-item " href="/yuxi/model/informationSearch/informationSearch.jsp"   aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>信息查询</a>
        
    </li>
    
    <li  class="menuPower-<%=powerUser.isUserManage()%>"><a class="list-group-item " href="#management" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>  用户管理</a>
        <ul  id="management" class="nav nav-list collapse secondmenu menu-container" >
          <li class="active"><a href="/yuxi/model/userManage/createUser.jsp"><span class="glyphicon glyphicon-user"></span> 创建用户</a></li>
          <li><a href="/yuxi/model/userManage/userList.jsp"><span class="glyphicon glyphicon-th-list"></span> 用户列表</a></li>
        </ul>
    </li>
	
   
     <li ><a class="list-group-item " href="#management2" data-toggle="collapse" aria-controls="collapseExample" aria-expanded="false" class="nav-header collapsed"> <span class="glyphicon glyphicon-cog"></span>民警个人汇报</a>
        <ul  id="management2" class="nav nav-list collapse secondmenu menu-container" >
          <li class="active"><a href="/yuxi/model/personal/personal.jsp"><span class="glyphicon glyphicon-user"></span>民警个人汇报</a></li>         
          <li class="active"><a href="/yuxi/model/personal/personalAB.jsp"><span class="glyphicon glyphicon-user"></span>民警选择B角</a></li>
           <li><a href="/yuxi/model/personal/personalComment.jsp"><span class="glyphicon glyphicon-user"></span>民警个人汇报待点评<span class="count-text waitRateCount" id=""></span></a></li> 
            <li><a href="/yuxi/model/personal/personalCommentAlready.jsp"><span class="glyphicon glyphicon-user"></span>民警个人汇报已点评</a></li> 
             <li><a href="/yuxi/model/personal/personalCommentWaitShow.jsp"><span class="glyphicon glyphicon-user"></span>民警个人汇报待查阅<span class="count-text waitCount" id=""></span></a></li> 
              <li><a href="/yuxi/model/personal/personalCommentAlreadyShow.jsp"><span class="glyphicon glyphicon-user"></span>民警个人汇报已查阅</a></li>             
        </ul>
    </li>
   
    </ul>
</div>
<script type="text/javascript">
	$(function(){
		var menuLi=$(".menu-container li a");
		$(menuLi).each(function(index){
			var shref=$(this).attr("href");
			$(this).attr("href",shref+"?menuId="+index);
		});
		
		$(menuLi).eq(<%=request.getParameter("menuId")%>).parent().parent().addClass("in").siblings("a").addClass("active");
		$("#menu-container").attr("menu-id",<%=request.getParameter("menuId")%>);
		
		
		YuXi.util.get("getFlowCount.do",null,function(data){
			if(data.status){
				var coutO=data.object;
				var x=coutO.taskDispatch+coutO.curTaskDispatch;
				$(".infoMange-count").text("("+coutO.infoMange+")");
				$(".firstCheck-count").text("("+coutO.firstCheck+")");
				$(".recheck-count").text("("+coutO.recheck+")");
				$(".check-count").text("("+coutO.check+")");
				$(".reSeach-count").text("("+coutO.reSeach+")");
				$(".taskDispatch-count").text("("+coutO.taskDispatch+")");
				$(".curTaskDispatch-count").text("("+coutO.curTaskDispatch+")");				
				$(".task-count-all").text("("+x+")");
				$(".taskDo-count").text("("+coutO.taskDo+")");
				$(".comment-count").text("("+coutO.comment+")");
				$(".rate-count").text("("+coutO.rate+")");
				$(".timeOut-count").text("("+coutO.timeOut+")");
				$(".queryComment-count").text("("+coutO.queryComment+")");
				$(".queryEvaluate-count").text("("+coutO.queryEvaluate+")");
			}
		});
	})
</script>